import axios from 'axios';
import qs from 'querystring';

export const addCustomAttribute = body => {
  return axios.post('/api/system/addCustomAttribute', body);
};

export const editCustomAttribute = body => {
  return axios.post('/api/system/editCustomAttribute', body);
};

export const changeAttributeStatus = body => {
  return axios.post('/api/system/changeAttributeStatus', body);
};

export const deleteCustomAttribute = id => {
  return axios.post('/api/system/deleteCustomAttribute', id);
};

export const getCustomAttributeList = params => {
  return axios.get(`/api/system/getCustomAttributeList?${qs.stringify(params)}`);
};
